﻿using System.Net.Http;
using System.Web;

namespace LaoLuo.Web.Mvc4
{
    public class CorsApiController : ExtendedApiController
    {
        public override System.Threading.Tasks.Task<HttpResponseMessage> ExecuteAsync(System.Web.Http.Controllers.HttpControllerContext controllerContext, System.Threading.CancellationToken cancellationToken)
        {
            HttpContext.Current.Response.AppendHeader("Access-Control-Allow-Origin", "*");

            return base.ExecuteAsync(controllerContext, cancellationToken);
        }
    }
}
